package service.com.geekbang.whatisthread;

public class StopALittle {
        public static void main(String[] args) throws InterruptedException {
                printSlowly("太阳在这个平静的小村庄升起，又开始了平常的一天。我们故事的主人公睡眼惺忪得起来\n"+
                                ".......",300);
        }


        public static void printSlowly(String text,long interval) throws InterruptedException {
                for(char ch:text.toCharArray()){
                        Thread.sleep(interval);
                        System.out.println(ch);
                }
                System.out.println();
        }
}